#include <stdio.h>

int fib(int n)
{
  int i;
  int cur = 1;
  int next = 1;
  int sum;

  for (i = 0; i < n; i++) {
	sum = cur + next;
	cur = next;
	next = sum;
  }
  return cur;
}

void main()
{
  int i;

  for (i = 0; i < 10; i++) {
    printf ("fib(%d) = %d\n", i, fib(i));
  }
}
